package cn.rwklyd.BookKeeping.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "category")
public class Category {
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "分类ID")
    private Integer id;

    @TableField(value = "user_id")
    @Schema(description = "用户ID，0表示系统预设分类")
    private Integer userId;

    @TableField(value = "name")
    @Schema(description = "分类名称")
    private String name;

    @TableField(value = "icon")
    @Schema(description = "分类图标")
    private String icon;

    @TableField(value = "color")
    @Schema(description = "分类颜色")
    private String color;

    @TableField(value = "create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(value = "update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @TableField(value = "status")
    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @TableField(value = "is_deleted")
    @Schema(description = "是否删除：0-否，1-是")
    private Integer isDeleted;

    @TableField(value = "spend")
    @Schema(description = "是否属于支出？")
    private Integer spend;
}
